package com.xp.tinyurl.admin.dto;

import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @Description 缩短链接DTO
 * @Author xp
 * @Date 2019/10/08 10：50
 * @since 2.0.0
 */
@Data
public class TinyUrlGenDTO implements Serializable {

    /**
     * 业务线
     */
    @NotNull
    private String businessLine;
    /**
     * 要缩短的网址
     */
    @NotBlank
    private String longUrl;

    /**
     * 在UPUSH后台申请的短链接通道
     */
    @NotNull
    private Long channelId;

    /**
     * 短链接有效期
     * ONE_DAY(1, "一天"),
     * THREE_MONTHS(2, "三个月"),
     * ONE_YEAR(3, "一年"),
     * FOREVER(4, "永久"),
     */
    @NotNull
    private Integer expired;

}
